In bridge literature diagrams of distribution of cards over
the hands are often given in order to demonstrate bidding
sequences or to explain play technique.
In order to do this systematically and to abstract from layout details
I wrote a macro — crdima
— with six parameters
- first parameter:
- text, especially who is the dealer and what is the
vulnerability. For example: N/None, for North dealer and
vulnerability none.
- second parameter:
- text, for example indication of play,
e.g., number
Play 1
or otherwise, e.g.,
\begin{minipage}[t]{\br}
Play:\\demo
\end{minipage}
- next four parameters:
- the four hands in the sequence N, W, E, S.
Each hand is a call of the
hand
macro
with four parameters: the
♠,
♥, tex2html_wrap_inline&diams#diamondsuit;, tex2html_wrap_inline&clubs#clubsuit; cards.
Example\crdima{N/None}{%
\begin{minipage}[t]{\br}
Play:\\demo
\end{minipage}}%
{\hand{J74}{AJ}{QJT2}{Q874}}%
{\hand{A3}{K76}{963}{KJ952}}%
{\hand{K86}{T9542}{874}{T3}}%
{\hand{QT952}{Q83}{AK5}{A6}}%
yields
N/None |
|
|
|
![\usebox{\NESW}](img1.png) |
|
|
|
|
Remarks
By this levelling I circumvented the limit of the
number of parameters. Because
parameter substitution is done by `text'
replacement there is no `(strong) type checking'
as in modern high-level programming languages.
There is no check on the correctness of the cards (correct number,
distribution, multiple occurrence or omission), nor on the correct sequence
of the parameters. In SGML compliance with the input syntax can be
imposed with enhanced user convenience and alleviated proofreading, but
at the expense of elaborate coding, [3].
No test on the
correctness of the sequence of the hands is ever possible, however.
The crdima
macro can be used
to display all phases of the play.
Hands can be suppressed at discretion of the user
by empty actual parameters.
A renounce can be supplied via --
.
In the listings of the commands used for the examples
the quote
environment command is omitted.
For tournaments (bridge) plays are often dealt by computer.
At the end of tournaments players appreciate prints
of the deals. For that purpose my (Pascal) deal program
generates ASCII output — for simple display on the PC —
as well as LATEX input, optionally. This input is printed
with the aid of crdima
. Parameter testing is superfluous
for LATEX input generated this way.